package com.definity.toolkit.ui.event;

import com.definity.toolkit.domain.Domain;

public class DomainEvent<D extends Domain<?>> implements Event {

	private final D domain;
	private final DomainOperationType domainOperationType;

	public DomainEvent(D domain, DomainOperationType domainOperationType) {
		this.domain = domain;
		this.domainOperationType = domainOperationType;
	}
	
	public D getDomain() {
		return domain;
	}
	
	public DomainOperationType getDomainOperationType() {
		return domainOperationType;
	}
	
	public static enum DomainOperationType {
		SAVE,
		INSERT,
		UPDATE,
		DELETE; 
	}
	
}
